package com.fanfeifei.web.domain.sqlprovider;
import static org.apache.ibatis.jdbc.SqlBuilder.BEGIN;  
import static org.apache.ibatis.jdbc.SqlBuilder.FROM;  
import static org.apache.ibatis.jdbc.SqlBuilder.SELECT;  
import static org.apache.ibatis.jdbc.SqlBuilder.SQL;  
import static org.apache.ibatis.jdbc.SqlBuilder.WHERE;  
import static org.apache.ibatis.jdbc.SqlBuilder.DELETE_FROM;  
import static org.apache.ibatis.jdbc.SqlBuilder.INSERT_INTO;  
import static org.apache.ibatis.jdbc.SqlBuilder.SET;  
import static org.apache.ibatis.jdbc.SqlBuilder.UPDATE;  
import static org.apache.ibatis.jdbc.SqlBuilder.VALUES;  
public class SampleUserSqlProvider {
	/** table name, here is test */  
    private static final String TABLE_NAME = "user";  
  
    public String updateSql() {  
        BEGIN();  
        UPDATE(TABLE_NAME);  
        SET("account = #{user.password}");  
        WHERE("account = #{user.account}");  
        return SQL();  
    }  
  
    /** 
     * delete a test sql script. 
     *  
     * @return 
     */  
    public String deleteSql() {  
        BEGIN();  
        DELETE_FROM(TABLE_NAME);  
        WHERE("account = #{user.account}");  
        return SQL();  
    }  
}
